/*
 * *
 *  * Copyright (c) iwindplus Technologies Co., Ltd.2024-2030, All rights reserved.
 *
 *
 */

package com.iwindplus.mgt.domain.dto.power;

import com.iwindplus.base.domain.dto.DbBaseDTO;
import com.iwindplus.base.domain.enums.EnableStatusEnum;
import com.iwindplus.base.domain.validation.EditGroup;
import com.iwindplus.base.domain.validation.SaveGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.Length;

/**
 * 资源数据传输对象.
 *
 * @author zengdegui
 * @since 2019/6/12
 */
@Schema(description = "资源数据传输对象")
@Data
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class MenuDTO extends DbBaseDTO {

    /**
     * 状态（DISABLE：禁用，ENABLE：启用，LOCKED：锁定）.
     */
    @Schema(description = "状态（DISABLE：禁用，ENABLE：启用，LOCKED：锁定）")
    private EnableStatusEnum status;

    /**
     * 编码.
     */
    @Schema(description = "编码")
    @Length(max = 50, message = "{code.length}", groups = {SaveGroup.class, EditGroup.class})
    private String code;

    /**
     * 名称.
     */
    @Schema(description = "名称")
    @NotBlank(message = "{name.notEmpty}", groups = {SaveGroup.class, EditGroup.class})
    @Length(max = 100, message = "{name.length}", groups = {SaveGroup.class, EditGroup.class})
    private String name;

    /**
     * 图标样式.
     */
    @Schema(description = "图标样式")
    @Length(max = 255, message = "{iconStyle.length}", groups = {SaveGroup.class, EditGroup.class})
    private String iconStyle;

    /**
     * 图标路径（相对路径）.
     */
    @Schema(description = "图标路径（相对路径）")
    @Length(max = 255, message = "{iconUrl.length}", groups = {SaveGroup.class, EditGroup.class})
    private String iconUrl;

    /**
     * 路由路径.
     */
    @Schema(description = "路由路径")
    @Length(max = 100, message = "{routeUrl.length}", groups = {SaveGroup.class, EditGroup.class})
    private String routeUrl;

    /**
     * 级别.
     */
    @Schema(description = "级别")
    private Integer level;

    /**
     * 排序号.
     */
    @Schema(description = "排序号")
    private Integer seq;

    /**
     * 是否隐藏.
     */
    @Schema(description = "是否隐藏")
    private Boolean hideFlag;

    /**
     * 是否内置（false：否，true：是）.
     */
    @Schema(description = "是否内置（false：否，true：是）")
    private Boolean buildInFlag;

    /**
     * 父类主键.
     */
    @Schema(description = "父类主键")
    private Long parentId;

    /**
     * 系统主键.
     */
    @Schema(description = "系统主键")
    @NotNull(message = "{systemId.notEmpty}", groups = {SaveGroup.class, EditGroup.class})
    private Long systemId;
}
